]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix various srcdir!=builddir issues
authorColin Walters <walters@verbum.org>
Thu, 23 Jun 2011 00:10:56 +0000 (20:10 -0400)
committerColin Walters <walters@verbum.org>
Thu, 23 Jun 2011 14:15:17 +0000 (10:15 -0400)
jhbuild will default to srcdir != builddir in the future for various
reasons.

The enum generation rules were just broken and both did
cd $(srcdir) and $(addprefix $(srcdir)).

Also, remove an unnecessary $(addprefix) from the GIR sources; thanks
to Dan Winship for pointing out that make will look in both srcdir and
builddir, so it's not necessary to add a prefix explicitly.  Doing so
breaks obviously when adding the sourcedir to a builddir file.

https://bugzilla.gnome.org/show_bug.cgi?id=653199

src/Makefile-st.am
src/Makefile.am

index ffeeb21b8361a68b6de3ee6ee8c56a67d141f3a1..e9ad2391e3c52410d90aeab6343059464116bab2 100644 (file)
@@ -47,20 +47,20 @@ st-marshal.c: Makefile st/st-marshal.list
 
 st-enum-types.h: stamp-st-enum-types.h Makefile
        @true
-stamp-st-enum-types.h: $(source_h) st/st-enum-types.h.in $(st_source_h)
-       $(AM_V_GEN) ( cd $(srcdir) &&                                   \
+stamp-st-enum-types.h: $(source_h) $(srcdir)/st/st-enum-types.h.in $(st_source_h)
+       $(AM_V_GEN) (                                                   \
          $(GLIB_MKENUMS)                                               \
-           --template st/st-enum-types.h.in                            \
-         $(st_source_h) ) >> $@.tmp &&                                 \
+           --template $(srcdir)/st/st-enum-types.h.in                          \
+         $(addprefix $(srcdir)/, $(st_source_h)) ) >> $@.tmp &&                \
        (cmp -s $@.tmp st-enum-types.h || cp $@.tmp st-enum-types.h) && \
        rm -f $@.tmp &&                                                 \
        echo timestamp > $(@F)
 
-st-enum-types.c: stamp-st-enum-types.h st/st-enum-types.c.in
-       $(AM_V_GEN) ( cd $(srcdir) &&           \
+st-enum-types.c: stamp-st-enum-types.h $(srcdir)/st/st-enum-types.c.in
+       $(AM_V_GEN) (                           \
          $(GLIB_MKENUMS)                       \
-           --template st/st-enum-types.c.in    \
-         $(st_source_h) ) >> $@.tmp &&         \
+           --template $(srcdir)/st/st-enum-types.c.in  \
+         $(addprefix $(srcdir)/,$(st_source_h)) ) >> $@.tmp &&         \
        cp $@.tmp $@ &&                         \
        rm -f $@.tmp
 
index d5e825aba0fa0c307de81f1cdf938e8173aba00a..dafb50fe409341232e2ee122ba2e1c3be1b74e45 100644 (file)
@@ -222,21 +222,21 @@ shell-marshal.c: Makefile shell-marshal.list
 shell-enum-types.h: stamp-shell-enum-types.h Makefile
        @true
 stamp-shell-enum-types.h: $(srcdir)/shell-enum-types.h.in $(shell_public_headers_h)
-       $(AM_V_GEN) ( cd $(srcdir) && \
+       $(AM_V_GEN) ( \
          $(GLIB_MKENUMS) \
            --template $< \
-         $(shell_public_headers_h) ) > $(@F).tmp && \
+         $(addprefix $(srcdir)/,$(shell_public_headers_h)) ) > $(@F).tmp && \
        (cmp -s $(@F).tmp shell-enum-types.h || mv $(@F).tmp shell-enum-types.h) && \
        rm -f $(@F).tmp && \
        echo timestamp > $(@F)
 EXTRA_DIST += shell-enum-types.h.in
 CLEANFILES += stamp-shell-enum-types.h
 
-shell-enum-types.c: shell-enum-types.c.in stamp-shell-enum-types.h
-       $(AM_V_GEN) ( cd $(srcdir) && \
+shell-enum-types.c: $(srcdir)/shell-enum-types.c.in stamp-shell-enum-types.h
+       $(AM_V_GEN) ( \
          $(GLIB_MKENUMS) \
            --template $< \
-         $(shell_public_headers_h) ) > $(@F).tmp && \
+         $(addprefix $(srcdir)/,$(shell_public_headers_h)) ) > $(@F).tmp && \
        mv $(@F).tmp $(@F) && \
        rm -f $(@F).tmp
 EXTRA_DIST += shell-enum-types.c.in
@@ -258,7 +258,7 @@ Shell-0.1.gir: libgnome-shell.la St-1.0.gir
 Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2
 Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
 Shell_0_1_gir_LIBS = libgnome-shell.la
-Shell_0_1_gir_FILES = $(addprefix $(srcdir)/,$(libgnome_shell_la_gir_sources))
+Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)
 Shell_0_1_gir_SCANNERFLAGS = --include-uninstalled=$(builddir)/St-1.0.gir \
        --add-include-path=$(MUTTER_GIR_DIR)
 INTROSPECTION_GIRS += Shell-0.1.gir